package extras.salvation.api.wrappers;

/**
 * @author Salvation
 * @version 1.0
 * @since 20-08-2011
 */
public final class Emote {

	private static final int PARENT = 590;
	private static final int CHILD = 8;

	private String name;
	private int parent, child, sub;

	public Emote(String name, int parent, int child, int sub) {
		this.name = name;
		this.parent = parent;
		this.child = child;
		this.sub = sub;
	}

	/**
	 * @author Salvation
	 * @return The name of this Emote.
	 */
	public String getName() {
		return name;
	}

	/**
	 * @author Salvation
	 * @return The parent id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
	 */
	public int getParent() {
		return parent;
	}

	/**
	 * @author Salvation
	 * @return The child id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
	 */
	public int getChild() {
		return child;
	}

	/**
	 * @author Salvation
	 * @return The sub id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
	 */
	public int getSub() {
		return sub;
	}

	/**
	 * @author Jordn
	 * @version 1.0
	 * @since 20-08-2011
	 */
	public static enum Emotes {
		YES("Yes", PARENT, CHILD, 0),
		NO("No", PARENT, CHILD, 1),
		BOW("Bow", PARENT, CHILD, 2),
		ANGRY("Angry", PARENT, CHILD, 3),
		THINK("Think", PARENT, CHILD, 4),
		WAVE("Wave", PARENT, CHILD, 5),
		SHRUG("shrug", PARENT, CHILD, 6),
		CHEER("Cheer", PARENT, CHILD, 7),
		BECKON("Beckon", PARENT, CHILD, 8),
		LAUGH("Laugh", PARENT, CHILD, 9),
		JUMP_FOR_JOY("Jump For Joy", PARENT, CHILD, 10),
		YAWN("Yawn", PARENT, CHILD, 11),
		DANCE("Dance", PARENT, CHILD, 12),
		JIG("Jig", PARENT, CHILD, 13),
		TWIRL("Twirl", PARENT, CHILD, 14),
		HEADBANG("Headbang", PARENT, CHILD, 15),
		CRY("Cry", PARENT, CHILD, 16),
		BLOW_KISS("Blow Kiss", PARENT, CHILD, 17),
		PANIC("Panic", PARENT, CHILD, 18),
		RASPBERRY("Raspberry", PARENT, CHILD, 19),
		CLAP("Clap", PARENT, CHILD, 20),
		SALUTE("Salute", PARENT, CHILD, 21);

		private String name;
		private int parent, child, sub;

		Emotes(String name, int parent, int child, int sub) {
			this.name = name;
			this.parent = parent;
			this.child = child;
			this.sub = sub;
		}

		/**
		 * @author Salvation
		 * @return The name of this Emote.
		 */
		public String getName() {
			return name;
		}

		/**
		 * @author Salvation
		 * @return The parent id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
		 */
		public int getParent() {
			return parent;
		}

		/**
		 * @author Salvation
		 * @return The child id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
		 */
		public int getChild() {
			return child;
		}

		/**
		 * @author Salvation
		 * @return The sub id for this emote's Component as in Widgets.getComponent(parent, child).getComponent(sub).
		 */
		public int getSub() {
			return sub;
		}

		/**
		 * @author Salvation
		 * @return The constructed Emote.
		 */
		public Emote getEmote() {
			return new Emote(name, parent, child, sub);
		}
	}
}